#ifndef __VCD_XRANDR_H__
#define __VCD_XRANDR_H__
#include "config.h"
#ifdef HAVE_XRANDR
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
#include <X11/Xproto.h>
#include <X11/Xatom.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xrender.h>	/* we share subpixel information */
#include <strings.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdarg.h>
#include <math.h>

#include <gtk/gtk.h>

G_BEGIN_DECLS


typedef enum {
    OUTPUT_CONNECT_YES,
    OUTPUT_CONNECT_NO,
    OUTPUT_CONNECT_UNKNOWN,
}OutputConnectStatus;

typedef struct _Output{
    char* name;
    OutputConnectStatus connected;
    char** modes;
    int nmode;
}OutPut;

typedef struct _DisOut{
    OutPut* output;
    int noutput;
    int cur_width;
    int cur_height;

    //private
    Display	*dpy;
    Window	root;
    int	screen;
    int	minWidth, maxWidth, minHeight, maxHeight;
    XRRScreenResources  *res;
}DisOut;

DisOut* get_dis_out(void);

void destroy_dis_out(DisOut* dis_out);

#endif
G_END_DECLS

#endif
